<script setup>
import {onMounted, onUnmounted, reactive, ref, version} from 'vue'
import Timer from './components/timer.vue'
const t = ref('')
const r = reactive({})
let tt
let timer = () => {
  let d = new Date()
  t.value = d.toLocaleTimeString()
}

timer()
onMounted(() => {
  tt = setInterval(timer, 1000)
})

onUnmounted(() => {
  clearInterval(tt)
})
</script>

<template>
  <Timer />
  <p>{{ t }}</p>
  <h3>hello world vue 3.x app</h3>
  <h3>{{ version }}</h3>
  <p v-for="i in 5">{{ i }}</p>
</template>

<style scoped>
h3 {
  color: #ff000055;
}
</style>
